<template>
    <div class="home-panel">
      <div class="header">
        <h4>{{ title }}</h4>
        <a :href="moreUrl">更多</a>
      </div>
      <!-- 商品列表 -->
      <div class="goods-list">
        <slot></slot>
      </div>
    </div>
</template>

<script setup>
defineProps({
  title: {
    type: String,
    default: ''
  },
  moreUrl: {
    type: String,
    default: ''
  }
})
</script>

<style scoped lang="scss">
  .home-panel {
    background-color: #fff;
    padding: 0 20px 20px 20px;
    margin-top: 20px;
    // height: 440px;
    .header {
      height: 66px;
      border-bottom: 1px solid #f5f5f5;
      padding: 18px 0;
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      h4 {
        font-size: 22px;
        font-weight: normal;
      }
      a {
        color: #999;
      }
    }
    .goods-list {
      display: flex;
    }
  }
</style>